package com.wz.utils.batch.service;


import com.wz.utils.batch.exception.BatchWithRollBack;
import com.wz.utils.batch.exception.MsgException;
import org.aspectj.lang.ProceedingJoinPoint;

import java.sql.SQLException;
import java.util.concurrent.BlockingDeque;
import java.util.concurrent.CountDownLatch;

public interface BatchWithService {

    /**
     * @Description:
     * @Author: ChenGang
     * @Date: 2021/8/31 17:49
     * @param joinPoint 需要批量处理的方法切入对象
     * @param args 执行参数
     * @param threadLatch 子线程计数器
     * @param mainLatch 主线程计数器
     * @param resultList 执行结果
     * @param rollBack 回滚对象
     **/
    Boolean childThreadRun(ProceedingJoinPoint joinPoint, Object[] args, CountDownLatch threadLatch, CountDownLatch mainLatch, BatchWithRollBack rollBack, BlockingDeque<Boolean> resultList) throws MsgException, SQLException;
}


